package com.caishi.lkx.exam.es.service;

import com.caishi.lkx.exam.es.model.QuestionEs;
import com.caishi.lkx.exam.es.dao.QuestionEsDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class QuestionEsService {
    @Resource
    private QuestionEsDao questionEsDao;
    public void update(QuestionEs questionEs) {
        questionEsDao.save(questionEs);
    }

    public void batchUpdate(List<QuestionEs> models) {
        questionEsDao.saveAll(models);
    }
    public void delete(String id) {
        questionEsDao.deleteById(id);
    }
    public List<QuestionEs> getByIds(List<String> ids) {
        return (List<QuestionEs>) questionEsDao.findAllById(ids);
    }
}
